package org.ch00.test05;

/*
 *
 *@author XCH
 *@date 2025 - 03 - 05 - 08:58
 *
 */
public class SecurityDoor extends Door implements Ring {
    private String name;

    public SecurityDoor() {
    }

    public SecurityDoor(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @Override
    public void close() {
        System.out.println("安全门关闭");
    }

    @Override
    public void open() {
        System.out.println("安全门开启");
    }
    @Override
    public void ring() {
        System.out.println("门铃响铃了");
        System.out.println("有小偷");
    }
}

